import { createEvent, createStore } from 'effector';
import { resetStore } from 'store';

// Event
export const setSocketId = createEvent<string | null>();

// Store
export const $socketId = createStore<string | null>(null)
  .on(setSocketId, (_, socketId) => socketId)
  .reset(resetStore);
